﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using PhoneDBModel;

public partial class CallHistory : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        PhoneDBEntities dbe = new PhoneDBEntities();
        var callsList = dbe.CallLogs.Where(c => c.UserId == SessionHandler.AuthUser.Id)
            .OrderByDescending(c => c.Timestamp).Take(50);
        dlCalls.DataSource = callsList;
        dlCalls.DataBind();
    }
}